bin: Move vfunc implementations before class_init
authorTimm Bäder <mail@baedert.org>
Tue, 31 Dec 2019 07:26:27 +0000 (08:26 +0100)
committerTimm Bäder <mail@baedert.org>
Tue, 7 Jan 2020 16:27:18 +0000 (17:27 +0100)
And avoid every single function prototype.

gtk/gtkbin.c

index 279ccdb466c6d3a1728449649d9bdbb5460d7d79..62f2245a77342b66fece46b69321e2b106334f31 100644 (file)
@@ -45,23 +45,6 @@ typedef struct
   GtkWidget *child;
 } GtkBinPrivate;
 
-static void gtk_bin_add         (GtkContainer   *container,
-                                GtkWidget      *widget);
-static void gtk_bin_remove      (GtkContainer   *container,
-                                GtkWidget      *widget);
-static void gtk_bin_forall      (GtkContainer   *container,
-                                GtkCallback     callback,
-                                gpointer        callback_data);
-static GType gtk_bin_child_type (GtkContainer   *container);
-
-static void               gtk_bin_measure                         (GtkWidget      *widget,
-                                                                   GtkOrientation  orientation,
-                                                                   int             for_size,
-                                                                   int            *minimum,
-                                                                   int            *natural,
-                                                                   int            *minimum_baseline,
-                                                                   int            *natural_baseline);
-
 G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GtkBin, gtk_bin, GTK_TYPE_CONTAINER)
 
 static void
@@ -81,26 +64,6 @@ gtk_bin_size_allocate (GtkWidget *widget,
                               }, baseline);
 }
 
-static void
-gtk_bin_class_init (GtkBinClass *class)
-{
-  GtkWidgetClass *widget_class = (GtkWidgetClass*) class;
-  GtkContainerClass *container_class = (GtkContainerClass*) class;
-
-  widget_class->measure = gtk_bin_measure;
-  widget_class->size_allocate = gtk_bin_size_allocate;
-
-  container_class->add = gtk_bin_add;
-  container_class->remove = gtk_bin_remove;
-  container_class->forall = gtk_bin_forall;
-  container_class->child_type = gtk_bin_child_type;
-}
-
-static void
-gtk_bin_init (GtkBin *bin)
-{
-}
-
 static GType
 gtk_bin_child_type (GtkContainer *container)
 {
@@ -195,6 +158,26 @@ gtk_bin_measure (GtkWidget *widget,
     }
 }
 
+static void
+gtk_bin_class_init (GtkBinClass *class)
+{
+  GtkWidgetClass *widget_class = (GtkWidgetClass*) class;
+  GtkContainerClass *container_class = (GtkContainerClass*) class;
+
+  widget_class->measure = gtk_bin_measure;
+  widget_class->size_allocate = gtk_bin_size_allocate;
+
+  container_class->add = gtk_bin_add;
+  container_class->remove = gtk_bin_remove;
+  container_class->forall = gtk_bin_forall;
+  container_class->child_type = gtk_bin_child_type;
+}
+
+static void
+gtk_bin_init (GtkBin *bin)
+{
+}
+
 /**
  * gtk_bin_get_child:
  * @bin: a #GtkBin